package com.qjj.studydainty.entity;

import android.app.Activity;
import android.os.Environment;
import android.os.Handler;

/*
@
*/public class MyApplication {

    public static final int ERROR_WEBVIEW = 16;
    public static final int DESTROY_WEB_VIEW = 17;

    public static final int OPEN_URL_IN_NEW_WINDOW = 18;

    public static final String APP_CACHE_DIRNAME = "/WebviewCachePath";
    public static final int ACTIVITY_OBJECT = 19;

    public static Activity recorderActivity = null;


    public static final int HIDE_MENU = 14;
    public static int SHOW_THEME_FLAG = 1;
    public static int SHOW_WHITE_THEME_FLAG = 1;
    public static int SHOW_BLACK_THEME_FLAG = 2;

    public static final int MarkerMenuId = 1;
    public static final int HistoryMenuId = 2;

    public static final int SHOW_TOOLBAR = 13;
    public static final int HIDE_TOOLBAR = 12;

    public static final int FILE_LENGTH = 15;

    public static final int UPDATE_VIEWPAGER = 20;

    public static final String PATH = Environment.getExternalStorageDirectory() + "/myDownload";

    public static Handler handler;
    public static String nightCode;

    //夜间模式CSS注入
    public static final String NIGHT_CSS = "javascript: (function() {\n" +
            "  \n" +
            "    css = document.createElement('link');\n" +
            "    css.id = 'qjj_browser_2019';\n" +
            "    css.rel = 'stylesheet';\n" +
            "    css.href = 'data:text/css,html,body,applet,object,h1,h2,h3,h4,h5,h6,blockquote,pre,abbr" +
            ",acronym,address,big,cite,code,del,dfn,em,font,img,ins," +
            "kbd,q,p,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i," +
            "center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table," +
            "caption,tbody,tfoot,thead,th,td{background:rgba(0,0,0,0) !important;" +
            "color:#fff !important;" +
            "border-color:#A0A0A0 !important;}" +
            "div,input,button,textarea,select,option,optgroup{background-color:#000 !" +
            "important;color:#fff !important;border-color:#A0A0A0 !important;}a,a " +
            "*{color:#ffffff !important; text-decoration:none !important;font-weight:bold " +
            "!important;background-color:rgba(0,0,0,0) !important;}a:active,a:hover,a:active *,a:hover *{color:#1F72D0 " +
            "!important;background-color:rgba(0,0,0,0) !important;}p,span{font color:#FF0000 " +
            "!important;color:#ffffff !important;background-color:rgba(0,0,0,0) " +
            "!important;}html{-webkit-filter: contrast(50%);}';\n" +
            "    document.getElementsByTagName('head')[0].appendChild(css);\n" +
            "  \n" +
            "})();";

    public static final String NIGHT_CSS1="    /*所有元素的背景色都设置为黑夜模式，原来使用#201f26（rgb）会影响celltick资讯详情页里列表项的图片显示，这里改用rgba，有0.8的透明度*/\n" +
            "*, *:before, *:after {\n" +
            "                box-sizing: inherit;\n" +
            "                background-color: rgba(32, 31, 38, 0.8) !important;\n" +
            "            }\n" +
            "\n" +
            "            /*背景颜色和一般字体颜色*/\n" +
            "            div,h1,h2,h3,h4,h5,h6,p,body,em,html,link,textarea,form,select,input,span,button,em,menu,aside,table,tr,td,nav,dl,dt,dd,amp-iframe,main{\n" +
            "                /*background-color: rgba(32, 31, 38, 0.8) !important;*/\n" +
            "                color: #888888!important;\n" +
            "                border-color: #555555 !important;\n" +
            "                text-shadow            : 0 0 0 #000; /*去掉文本的阴影效果*/\n" +
            "            }\n" +
            "\n" +
            "            /*超链接*/\n" +
            "            a{\n" +
            "                color:#3c5180 !important;\n" +
            "            }\n" +
            "\n" +
            "            strong {\n" +
            "                display: block;\n" +
            "            }\n" +
            "\n" +
            "            img, video, iframe, canvas, svg,amp-social-share,\n" +
            "            embed[type='application/x-shockwave-flash'],\n" +
            "            object[type='application/x-shockwave-flash'],\n" +
            "                    *[style*='url('] {\n" +
            "                -webkit-filter : opacity(50%);\n" +
            "                -ms-filter     : opacity(50%);\n" +
            "                filter         : opacity(50%);\n" +
            "            }";
}
